﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>培训计划编辑</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../static/css/font.css">
    <link rel="stylesheet" href="../../../static/css/weadmin.css">
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .showleft {
            text-align: left;
            min-width: 150px;
        }

        .longlabel {
            width: 80%;
            min-width: 400px;
        }
    </style>
</head>
<body>
    <div class="weadmin-body">
        <form class="layui-form">
            <div class="layui-form-item">
                <label for="TPName" class="layui-form-label">
                    <span class="we-red">*</span>计划名称
                </label>
                <div class="layui-input-block">
                    <input type="text" id="TPName" name="TPName" placeholder="请输入" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="TPDescribe" class="layui-form-label">
                    计划描述
                </label>
                <div class="layui-input-block">
                    <textarea id="TPDescribe" name="TPDescribe" placeholder="请输入" class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="layui-form-item">

                <label for="TPReleaseStart" class="layui-form-label">
                    <span class="we-red">*</span>结束时间
                </label>
                <div class="layui-input-inline">
                    <input id="TPReleaseStart" name="TPReleaseStart" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
                <label for="TPReleaseEnd" class="layui-form-label">
                    <span class="we-red">*</span>结束时间
                </label>
                <div class="layui-input-inline">
                    <input id="TPReleaseEnd" name="TPReleaseEnd" lay-verify="required" autocomplete="off" class="layui-input">
                </div>
                <label for="TPDepID" class="layui-form-label">
                    <span class="we-red">*</span>考试部门
                </label>
                <div id="TPDepID" class="layui-input-inline">
                </div>
            </div>
            <div class="layui-form-item">

                <label for="TPDesignUserName" class="layui-form-label">
                    设计人员
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="TPDesignUserName" name="TPDesignUserName" placeholder="多个人|隔开" autocomplete="off" class="layui-input">
                </div>
                <label for="TPIsRelease" class="layui-form-label">
                    在发布
                </label>
                <div class="layui-input-inline">
                    <input type="checkbox" id="TPIsRelease" name="TPIsRelease" lay-skin="switch" lay-filter="switchIsRelease" lay-text="是|否">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="add">确定</button>
                </div>
            </div>
        </form>
    </div>
    <script src="../../../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../../../static/js/common.js" charset="utf-8"></script>

    <script>
        layui.use(['jquery', 'layer', 'laydate', 'selectM'], function () {
            var $ = layui.jquery,
                layer = layui.layer,
                laydate = layui.laydate,
                selectM = layui.selectM,
                layer = layui.layer;
            laydate.render({
                    elem: '#TPReleaseStart'
                });
            laydate.render({
                elem: '#TPReleaseEnd'
            });
            $.support.cors = true; 

        //    $(function () {
        //        //加载部门下拉框
        //        var depdata = [];
        //        var deplist = $.ajax({
        //            url: ApiUrl + "Dep/Sel",
        //            type: 'post',
        //            success: function (data) {
        //                if (data.StatusCode == 200) {
        //                    depdata = data.Data;
        //                }
        //                else if (data.StatusCode == 403) {
        //                    top.layer.alert(data.Info + ",请重新登录！", { closeBtn: 0 }, function () {
        //                        top.location.href = "http://" + top.location.host + "/login.html";
        //                    })
        //                }
        //                else {
        //                    layer.msg(data.Info);
        //                }
        //            }
        //        });
        //        $.ajax({
        //            url: ApiUrl + "TrainPlan/GetSingle",
        //            type: 'get',
        //            dataType: 'json',
        //            cache: false,
        //            headers: {
        //                "userid": JSON.parse(window.localStorage.authInfo).UserId,
        //                "signtoken": JSON.parse(window.localStorage.authInfo).SignToken,
        //            },
        //            data: { TPID: getUrlParam("TPID") },
        //            success: function (data) {
        //                if (data.StatusCode == 200) {
        //                    document.getElementById("TPName").value = data.Data.TPName;
        //                    document.getElementById("TPDescribe").value = data.Data.TPDescribe;
        //                    document.getElementById("TPReleaseStart").value = data.Data.TPReleaseStart;
        //                    document.getElementById("TPReleaseEnd").value = data.Data.TPReleaseEnd;
        //                    document.getElementById("TPDesignUserName").value = data.Data.TPDesignUserName;
        //                    document.getElementById("EPIsRelease").value = data.Data.EPIsRelease;

        //                }
        //                else if (data.StatusCode == 403) {
        //                    top.layer.alert(data.Info + ",请重新登录！", { closeBtn: 0 }, function () {
        //                        top.location.href = "http://" + top.location.host + "/login.html";
        //                    })
        //                }
        //                else {
        //                    layer.msg(data.Info);
        //                }
        //            }
        //        });
        });
    </script>
</body>
</html>